import Vue from 'vue'
import App from './App.vue'
import router from '@/router'
import store from '@/store'
import './assets/fonts/iconfont.css'
import login from './plugins/loading/index'
import {
  Tabbar, TabbarItem, Icon, Swipe, SwipeItem, Grid,
  GridItem, PullRefresh, List, NavBar, GoodsAction,
  GoodsActionIcon, GoodsActionButton, Popup, Card, Stepper,
  Button, Field, Form, SwipeCell, Checkbox, SubmitBar, Loading, AddressEdit,
  AddressList, ContactCard, Search, Lazyload
} from 'vant'
import loadImg from './assets/img/load.gif'
// const loadImg = require('./assets/img/load.gif')
Vue.use(login)
Vue.use(Tabbar)
  .use(TabbarItem)
  .use(Icon)
  .use(Swipe)
  .use(SwipeItem)
  .use(Grid)
  .use(GridItem)
  .use(PullRefresh)
  .use(List)
  .use(NavBar)
  .use(GoodsAction)
  .use(GoodsActionIcon)
  .use(GoodsActionButton)
  .use(Popup)
  .use(Card)
  .use(Stepper)
  .use(Button)
  .use(Field)
  .use(Form)
  .use(SwipeCell)
  .use(Checkbox)
  .use(SubmitBar)
  .use(Loading)
  .use(AddressEdit)
  .use(AddressList)
  .use(ContactCard)
  .use(Search)
  .use(Lazyload, {
    preload: 1,
    loading: loadImg
  })
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
